/* Team 5
 * James McQueen
 * Corwyn Simpson
 * May 1 ish, 2012
 */
package spider.models;

import java.net.URL;

/**
 * A model of a web page that has both an origin and the text from that web page.
 * @author James McQueen
 */
public class Page
{
    /**
     * The URL that this page came from.
     */
    private URL my_url;
    /**
     * The raw text that was fetched from my_url.
     */
    private String my_text;
    
    /**
     * Creates a new Page with the given source and text.
     * @param the_url The source of the web page.
     * @param the_text The raw text from the source.
     */
    public Page(final URL the_url, final String the_text)
    {
        my_url = the_url;
        my_text = the_text;
    }
    
    /**
     * Returns the source of the page.
     */
    public URL getUrl()
    {
        return my_url;
    }
    
    /**
     * Returns the raw text from the source page.
     */
    public String getText()
    {
        return my_text;
    }
    
    /**
     * Returns the string representation of this Page.
     */
    @Override
    public String toString()
    {
        String page ="my_url: " + my_url + "  my_text: " + my_text;   
        return (page);
    }
}
